<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>callbacks.locked()</title>
<link type="text/css" rel="stylesheet" href="style/style.css" tppabs="http://www.erdangjiade.com/manual/jquery/jquery/style/style.css"  />
</head>
<body id="split">
<div id="content">
  <div rel="callbacks.locked">
    <h2><span>返回值:Boolean</span>callbacks.locked()</h2>
    <h3><em>V1.7</em>概述</h3>
    <div class="desc">
      <p> 确定是否已被锁定的回调列表。 </p>
      <div class="longdesc">
        <p></p>
      </div>
    </div>
    <div class="example">
      <h3>示例</h3>
      <span id="f_ad2"></span>
      <h4>描述:</h4>
      <p> 用&nbsp;callbacks.locked()&nbsp;确定是否已被锁定的回调列表。: </p>
      <h5>jQuery 代码:</h5>
      <pre><code>// a sample logging function to be added to a callbacks list
var foo = function( value ){
    console.log( 'foo:' + value);
}

var callbacks = $.Callbacks();

// add the logging function to the callback list
callbacks.add( foo );

// fire the items on the list, passing an argument
callbacks.fire( 'hello' );
// outputs 'foo: hello'

// lock the callbacks list
callbacks.lock();

// test the lock-state of the list
console.log ( callbacks.locked() ); //true</code></pre>
    </div>
  </div>
</div>
</body>
</html>